package com.yegs.quartz.service;

import com.yegs.quartz.entity.StoreException;
import com.yegs.quartz.mysqlEntity.JobVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface JobService {

    public List<JobVo> findAll();

    @Transactional(rollbackFor = StoreException.class,transactionManager = "transactionManagerDatabase1")
    public void save(JobVo job);


    @Transactional(rollbackFor = StoreException.class,transactionManager = "transactionManagerDatabase1")
    public void triggerStatus(Long id,String states);

    @Transactional(rollbackFor = StoreException.class,transactionManager = "transactionManagerDatabase1")
    public void del(Long id);

    @Transactional(rollbackFor = StoreException.class,transactionManager = "transactionManagerDatabase1")
    void trigger(Long id);
}
